using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;

public class DestroyBall : MonoBehaviour
{
    public TextMesh getNumberText;
    public int getNumber = 0;
    public GameManagerTop managerTop;
    public GameManagerLow managerLow;
    public GameObject text;
    public float timer;

    private void Start()
    {
        getNumberText.text = getNumber.ToString();
    }

    private void OnTriggerEnter(Collider other)
    {
        Tweener tweener = text.transform.DOPunchScale(new Vector3(0, 1, 0), 0.1f, 1, 0);
        Destroy(other.gameObject);
        getNumber++;
        getNumberText.text = getNumber.ToString();
        timer = 3;
    }
}
